﻿using RRKAutohaus.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RRKAutohaus.Core.EntityFramework.Configuration
{
    public class VideoConfig: EntityTypeConfiguration<Video>
    {
        public VideoConfig()
        {
            //1 car has 1 or more video
            HasRequired(video => video.Car)
                .WithMany(car => car.Video)
                .HasForeignKey(car => car.CarId);
        }
    }
}
